fix(hlo): concatenate axis-sum (#667) + reshape shape lookup (#666); cut 0.28.0#670
Merged
Merged
Conversation
#666); cut 0.28.0 ShapeOperationsConverter: - convertConcat now COMPUTES the result type, summing the operands' extents on the concatenated axis, instead of trusting the node's declared output spec (which mis-inferred the axis for >2 operands — e.g. (1x1x8x8, 1x4x8x8, 1x1x8x8) along dim 1 produced 1x1x8x8 instead of 1x6x8x8). [#667] - convertReshape now also reads the target shape from the `outputShape` parameter (the key the reshape trace records it under) and synthesises a typed result when no output spec is declared, so a reshape no longer lowers to an empty function. [#666] Adds ReshapeConcatShapeFixTest covering both; full skainet-compile-hlo suite green. Bumps VERSION_NAME to 0.28.0 (also carries the develop-only #663/#668 export fixes). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes two StableHLO shape-converter bugs surfaced by the conformance harness, and bumps the version to 0.28.0 (which also ships the develop-only #663/#668 export fixes — none are in a 0.27.x tag yet).
#667 — multi-input concatenate mis-infers the axis
convertConcat trusted the node's declared output spec, which had the wrong extent on the concatenated axis for >2 operands (e.g. (1x1x8x8, 1x4x8x8, 1x1x8x8) dim 1 -> 1x1x8x8 instead of 1x6x8x8). Now it computes the result type by summing the operands' extents on the axis.
#666 — reshape lowers to an empty function
convertReshape only looked under shape/newShape/output-spec. The reshape trace records the target under outputShape, so it bailed with 'requires a target shape specification'. Now it also reads outputShape and synthesises a typed result when no output spec is present.
Adds ReshapeConcatShapeFixTest (both cases); full skainet-compile-hlo jvmTest suite is green. Closes #666, #667.